package com.hdoit.kylin.web.common;

import java.util.ArrayList;
import java.util.Date;
import java.util.List;

import com.hdoit.kylin.selfcommon.utils.ScheduleItem;

public class ScheduleUtils {
	public static List<ScheduleItem> schedules = new ArrayList<ScheduleItem>();
	
	public static String []weeks = {
		"first","second","third","forth","fifth","sixth","seventh","eighth","ninth","tenth",
		"eleventh","twelfth","thirteenth","fourteenth","fifteenth","sixteenth","seventeenth",
		"eighteenth","nineteenth","twentieth","twentyfirst","twentysecond"
	};
	
	public static void setWeekDate(List<Date> weekDates ){
		int i = 0;
		schedules.clear();
		for(Date weekDate:weekDates){
			ScheduleItem scheduleItem = new ScheduleItem();
			scheduleItem.setWeek(weeks[i]);
			i++;
			scheduleItem.setWeekDate(weekDate);
			schedules.add(scheduleItem);
		}
		
	}
}
